from app import create_app, db
from flask_migrate import upgrade

app = create_app()

def init_db():
    with app.app_context():
        # 执行数据库迁移
        upgrade()

if __name__ == '__main__':
    init_db() 